<admintpl file="headerEx" />
</head>
<body class="sticky-header">
<section>
    <!-- main content start-->
    <div class="full-content" >
        <!--body wrapper start-->
        <div class="wrapper ">
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel ">
                        <header class="panel-heading">
                            {:L('FILES_MANAGER')}
                            <span class="tools pull-right">
                                <!--隐藏功能按钮-->
                                <!--<a href="javascript:;" class="fa fa-chevron-down"></a>-->
                                <!--<a href="javascript:;" class="fa fa-times"></a>-->
                             </span>
                        </header>
                        <div class="panel-body">
                            <ul id="filters1" class="media-filter">
                                <volist name="types" id="vo">
                                    <li><a href="{:leuu('Files/FileManageradmin/index',array('fileType'=>$vo))}" title="{:tcioc_get_file_type_name($vo)}" >{:tcioc_get_file_type_name($vo)} </a></li>
                                </volist>
                            </ul>
                            <div class="btn-group pull-right">
                                <!--<a href="#upload_plane_modal" class="btn btn-primary btn-sm" data-toggle="data-toggle"><i class="fa fa-check-square-o"></i> {:L("SELECT_ALL")}</a>-->
                                <!--<a href="#upload_plane_modal" class="btn btn-primary btn-sm" data-toggle="modal"><i class="fa fa-trash-o"></i> {:L("DELETE")}</a>-->
                                <a href="#upload_plane_modal" class="btn btn-primary btn-sm" data-toggle="modal"><i class="fa fa-upload"></i> {:L("UPLOAD_NEW_FILE")}</a>
                            </div>
                            <div id="gallery" class="media-gal">
                                <volist name="lists" id="vo" empty="暂无数据">
                                    <div class="{$vo.file_category} item " >
                                        <a href="#myModal_{$vo.file_id}" data-toggle="modal">
                                            <img src="{$vo.index_img}" alt="图片不存在，可能已丢失"  title="{$vo.title}"/>
                                        </a>
                                        <p>{$vo.name} </p>
                                    </div>
                                </volist>
                            </div>
                            <div class="col-md-12 text-center clearfix">
                                {$pages}
                            </div>
                            <!-- Modal -->
                            <div class="modal fade" id="upload_plane_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"   aria-controls="true" aria-hidden="true">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal"  aria-hidden="true">&times;</button>
                                            <h4 class="modal-title">{:L("UPLOAD_NEW_FILE")} ({:L("DROP_FILES")})</h4>
                                        </div>

                                        <div class="modal-body row" id="uploadFilePanel" >
                                            <iframe style="width:100%;height: 450px;" frameborder="0" class="appiframe" src="{:leuu('Asset/Asset/plupload',array('multi'=>1,'filetype'=>'image','app'=>'Files','hide'=>1))}" id="appiframe-index_postlist_file"></iframe>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <volist name="lists" id="vo">
                            <div class="modal fade" id="myModal_{$vo.file_id}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                <div class="modal-dialog">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                                            <h4 class="modal-title">{:L("EDIT_MEDIA_GALLERY")}</h4>
                                        </div>
                                        <div class="modal-body row">
                                            <div class="col-md-5 img-modal">
                                                <img src="{$vo.index_img}" alt="{$vo.name}" title="{$vo.title}">
                                                <a href="#" class="btn btn-white btn-sm"><i class="fa fa-pencil"></i>{:L("EDIT_IMAGE")}</a>
                                                <a href="#" class="btn btn-white btn-sm"><i class="fa fa-eye"></i> {:L("VIEW_FULL_SIZE")}</a>
                                                <p class="mtop10"><strong>{:L("FILE_NAME")}:</strong> {$vo.name}</p>
                                                <p><strong>{:L("FILE_TYPE")}:</strong> {$vo.file_type}</p>
                                                <p><strong>{:L("RESOLUTION")}(宽*高):</strong> {$vo.width} x {$vo.height}</p>
                                                <p><strong>{:L("FILE_SIZE")}:</strong> <php> echo round($vo['file_size']/1048576,1);  </php>  M</p>
                                                <p><strong>{:L("UPLOADED_BY")}:</strong> <a href="#">admin</a></p>
                                            </div>
                                            <div class="col-md-7">
                                                <div class="form-group">
                                                    <label for="name_{$vo.file_id}"> {:L("FILE_NAME")}</label>
                                                    <input id="name_{$vo.file_id}" name="name" value="{$vo.name}" class="form-control">
                                                </div>
                                                <div class="form-group">
                                                    <label for="title_{$vo.file_id}"> {:L("TITTLE_TEXT")}</label>
                                                    <input id="title_{$vo.file_id}" name="title" value="{$vo.title}" class="form-control">
                                                </div>
                                                <div class="form-group">
                                                    <label for="desc_{$vo.file_id}"> {:L("DESCRIPTION")}</label>
                                                    <textarea id="desc_{$vo.file_id}" name="desc" rows="2" class="form-control">{$vo.desc}</textarea>
                                                </div>
                                                <div class="form-group">
                                                    <label for="link_{$vo.file_id}"> {:L("LINK_URL")} </label>
                                                    <input id="link_{$vo.file_id}" name="uri"  value="{$vo.uri}" class="form-control">
                                                </div>
                                                <div class="pull-right">
                                                    <input type="hidden" name="id" value="{$vo.file_id}">
                                                    <button class="btn btn-danger btn-sm btn-file-delete" data-url="{:leuu('Files/FileManageradmin/delete',array('id'=>$vo['file_id']))}" type="button">{:L("DELETE")}</button>
                                                    <button class="btn btn-success btn-sm btn-file-save" data-url="{:leuu('Files/FileManageradmin/save')}" type="button">{:L("SAVE_CHANGES")}</button>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            </volist>
                            <!-- modal -->
                        </div>
                    </section>
                </div>
            </div>
        </div>
        <!--body wrapper end-->
        <!--footer section start-->
        <footer>
            <admintpl file="copyright" />
        </footer>
        <!--footer section end-->
    </div>
    <!-- main content end-->
</section>
<admintpl file="script" />
<script src="__PUBLIC__/js/common.js"></script>
<script src="__TMPL__Public/files/index.js"></script>
<script type="text/javascript">
    $(function() {
        var $container = $('#gallery');
        $container.isotope({
            itemSelector: '.item',
            animationOptions: {
                duration: 750,
                easing: 'linear',
                queue: false
            }
        });
    });
</script>
</body>
</html>